﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    @{
      
        }
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title id="content_title"></title>
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0,  user-scalable=no" />

    <link href="/Content/css/h5news/main.css" rel="stylesheet" />
    <script src="/Content/scripts/jquery-1.11.2.min.js"></script>
    <script src="/Content/layui/lay/modules/layer.js"></script>
</head>
<body style="background:#FFF">
    <div class="details">
        <input type="hidden" value="@ViewBag.Id" id="txt_Id" />
        <h2 class="details_h2" id="txt_title"></h2>
        <span class="details_span">
            <span id="txt_CreateTime"></span>
            <em class="details_span_em" id="details_span_em">来源：ALLESGUT礼物商城</em>
        </span>

        <div class="details-xq" id="contentpanel">
            <div id="txt_Content">

            </div>
            <div src="" id="span_image">

            </div>
            
        </div>
        <div class="clear"></div>
    </div>

    <script>

        $(document).ready(function () {
            load();
        })

        function load() {
            var index = layer.load(1);
            var url = "/Wechat/WechatMemuAjax?sub=getImageText";
            var id = $("#txt_Id").val();
            if (parseInt(id) > 0) {
                $.post(url, { "Id": id }, function (datas) {
                    var data = JSON.parse(datas)
                    if (data.status) {
                        var MsgTitle = data.data[0].title;
                        var MsgPic = data.data[0].picUrl;
                        var MsgCreateTime = data.data[0].createTime;
                        var MsgContent = data.data[0].content;
                        if (MsgPic != "") {
                            $("#span_image").html("<img src=\"" + MsgPic + "\" />");
                        }

                        $("#txt_CreateTime").html(MsgCreateTime);
                        $("#content_title").html(MsgTitle);
                        $("#txt_title").html(MsgTitle);
                        $("#txt_Content").html(MsgContent);

                    } else {
                        layer.msg(data.message)
                    }
                    layer.close(index);

                }, "json");
            }

        }
    </script>
</body>
</html>
